﻿@{
    ViewBag.Title = "Examine_Leave";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using DepartmentWork.Model
@model DepartmentWork.Model.ProjectDeskLeaveViewModel
<link href="~/Assets/plugins/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" />
<script src="~/Assets/plugins/bootstrap-select/bootstrap-select.min.js"></script>

<link href="~/Assets/plugins/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet" />
<link href="~/Assets/plugins/bootstrap-datepicker/css/datepicker-theme.css" rel="stylesheet" />
<script src="~/Assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="~/Assets/plugins/chosen/chosen.jquery.min.js"></script>
<script src="~/Assets/js/pages/form-elements.js"></script>
<style>
    .btn-default {
        color: #333;
        background-color: #FFF;
        border-color: #CCC;
        height: 34px;
    }
</style>

<div class="page-header">
    <div class="pull-left">
        <ol class="breadcrumb visible-sm visible-md visible-lg">
            <li><a href="index.html"><i class="icon fa fa-home"></i>主页</a></li>
            <li><a href="~/DepartmentArea/Leave/Leave"><i class="fa fa-envelope"></i>请假管理</a></li>
            <li class="active"><a href="#"><i class="fa fa-envelope"></i>请假编辑</a></li>
        </ol>
    </div>
</div>


@{
    if (ViewBag.Flag == "True")
    {
    <div class="alert alert-success">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>&emsp;@ViewBag.FlagInfo！</strong>
    </div>
    }
    if (ViewBag.Flag == "False")
    {
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>&emsp;操作失败！</strong> @ViewBag.FlagInfo
    </div>
    }
}



<div class="col-md-8 col-xs-12" style="width: 70%">
    <div class="panel bk-widget bk-border-off bk-noradius">
        <div class="panel">
            <div class="panel-heading bk-bg-primary">
                <h6><i class="fa fa-table red"></i><span class="break"></span>请假表单</h6>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <tbody>
                            <tr>
                                <td style="width: 15%"><b>请假人:</b></td>
                                <td style="width: 35%" data-project-field="name">@this.Model.leave_name</td>
                                <td style="width: 15%"><b>申请时间:</b></td>
                                <td style="width: 35%" data-project-field="no">@this.Model.leave_time.ToString("yyyy-MM-dd")</td>
                            </tr>


                            <tr>
                                <td><b>请假天数:</b></td>
                                <td data-project-field="owner">@this.Model.leave_howmanydays</td>
                                <td><b>请假类别:</b></td>
                                <td data-project-field="user">@this.Model.leave_classes</td>
                            </tr>
                            <tr>
                                <td><b>第几次请假:</b></td>
                                <td colspan="3">@this.Model.leave_quantity</td>
                            </tr>
                            <tr>
                                <td><b>请假事由:</b></td>
                                <td colspan="3" data-project-field="description">@this.Model.leave_cause</td>
                            </tr>
                            <tr>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>






<div class="col-lg-4 col-md-12" style="width: 30%; float: right">
    <div class="panel panel-default">
        <div class="panel-heading bk-bg-white">
            <h4><b>请假审批</b></h4>
            <div class="panel-actions">
                <a href="#" class="btn-minimize"><i class="fa fa-caret-up"></i></a>
                <a href="#" class="btn-close"><i class="fa fa-times"></i></a>

            </div>
        </div>
        <div class="panel-body bk-noradius">
            <hr class="bk-margin-off">
            <div class="bk-bg-white bk-padding-off-top bk-padding-off-bottom">
                <div class="row">
                    <div class="col-xs-9 bk-vcenter">
                        <a data-toggle="modal" data-target="#changeProjectStateModal">
                            <h4 class="bk-fg-primary bk-fg-darken bk-margin-off-bottom">修改当请假状态</h4>
                        </a>

                    </div>
                </div>
            </div>
            <hr class="bk-margin-off">
        </div>
    </div>
</div>



<!-- 模态框（Modal） -->

<div class="modal fade" id="changeProjectStateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel2">请假审批</h4>
            </div>
            <form action="@Url.Action("UpdatLeave", "Leave")" method="POST">
                <div class="modal-body">
                    <input type="hidden" name="tb_leave_id" value="@this.Model.leave_id"/>
                    <div class="row">
                        <br />
                        <label class="col-md-3 control-label">请假审批操作：</label>
                        <div class="col-md-9">

                            <select name="select_LeaveStatus" class="form-control select2">
                                <option value="0">未通过</option>
                                <option value="1">通过</option>
                            </select>
                        </div>
                    </div>

                    <br />

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <input type="submit" class="btn btn-primary" value="提交更改" />
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>
